
<?php 
if($mode== "ADD"){

	?>
<div class="heading-buttons">
	<h3 class="glyphicons globe">
		<i></i> Location Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> Add New State
		</h4>

		<span class="pull-right"> <a
			href="<?= base_url();?>secure/location/location_management"> <span
				class="btn btn-inverse margin-right"><i
					class="icon-th-list icon-white"></i> Back to StateList </span>
		</a>

		</span>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/location/location_management/insert_state">




				<fieldset>

					<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							<td colspan="3" class="table-no-broder"><?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
							</td>
						</tr>
						<tr>
							<td class="table-no-broder">State Name</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="state_name" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="url" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_title" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_keyword" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder"><textarea name="meta_description"
									class="span12" rows="5"></textarea>
							</td>
							<td class="table-no-broder"></td>
						
						
						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label> <input type="hidden"
									name="parent_id" value="State_id">
									<button type="submit"
										class="btn btn-icon btn-primary glyphicons circle_ok pull-right"
										name="insert" value="Add State"
										<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
										<i></i>Add State
									</button>
							</label>
							</td>
							<td></td>
						</tr>
					</table>



				</fieldset>

			</form>


		</div>
	</div>
</div>
<?php }?>
<?php 
if($mode=="EDIT"){
	?>
<div class="heading-buttons">
	<h3 class="glyphicons globe">
		<i></i> Location Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> Edit State : <span class="text-error"><?= $state['info']->statename;?>
			</span>
		</h4>
		<span class="pull-right"> <a
			href="<?= base_url();?>secure/location/location_management"> <span
				class="btn btn-inverse margin-right"><i
					class="icon-th-list icon-white"></i> Back to Statelist </span>
		</a>

		</span>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/location/location_management/update_state">
				<fieldset>
					<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							<td colspan="3" class="table-no-broder"><?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
							</td>
						</tr>
						<tr>
							<td class="table-no-broder">State Name</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="state_name" value="<?= $state['info']->statename;?> "></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"> <input
								class="span12" type="text" name="url"
								value="<?= $state['info']->url;?> " /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_title" value="<?= $state['info']->meta_title;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_keyword" value="<?= $state['info']->meta_keyword;?>" />
							</td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder"><textarea name="meta_description"
									class="span12" rows="5">
									<?= $state['info']->meta_description;?>
								</textarea>
							</td>
							<td class="table-no-broder"></td>
						
						
						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label> <input type="hidden"
									name="state_id" value="<?= $state['info']->id;?>">
									<button type="submit"
										class="btn btn-icon btn-primary glyphicons circle_ok pull-right"
										name="insert" value="Update State"
										<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
										<i></i>Update State
									</button>
							</label>
							</td>
							<td></td>
						</tr>
					</table>

				</fieldset>

			</form>


		</div>
	</div>
</div>

<?php }?>
<?php 
if($mode== "CITY ADD"){

	?>
<div class="heading-buttons">
	<h3 class="glyphicons globe">
		<i></i> Location Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> Add New City
		</h4>

		<span class="pull-right"> <a
			href="<?= base_url();?>secure/location/location_management/viewcity/<?= $state_id;?>">
				<span class="btn btn-inverse margin-right"><i
					class="icon-th-list icon-white"></i> Back to CityList </span>
		</a>

		</span>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/location/location_management/insert_city">




				<fieldset>

					<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							<td colspan="3" class="table-no-broder"><?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
							</td>
						</tr>
						<tr>
							<td class="table-no-broder">City Name</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="city_name" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="url" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_title" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_keyword" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder"><textarea name="meta_description"
									class="span12" rows="5"></textarea>
							</td>
							<td class="table-no-broder"></td>
						
						
						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label> <input type="hidden"
									name="state_id" value="<?= $state_id;?>">
									<button type="submit"
										class="btn btn-icon btn-primary glyphicons circle_ok pull-right"
										name="insert" value="Add State"
										<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
										<i></i>Add City
									</button>
							</label>
							</td>
							<td></td>
						</tr>
					</table>



				</fieldset>

			</form>


		</div>
	</div>
</div>
<?php }?>

<?php 
if($mode=="CITY EDIT"){
	?>
<div class="heading-buttons">
	<h3 class="glyphicons globe">
		<i></i> Location Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> Edit City : <span class="text-error"><?= $city['info']->cityname;?>
			</span>
		</h4>
		<span class="pull-right"> <a
			href="<?= base_url();?>secure/location/location_management/viewcity/<?= $state_id;?>">

				<span class="btn btn-inverse margin-right"><i
					class="icon-th-list icon-white"></i> Back to Citylist </span>
		</a>

		</span>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/location/location_management/update_city">
				<fieldset>
					<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							<td colspan="3" class="table-no-broder"><?php
							$this->session->flashdata('message'); {
								$msg = $this->session->flashdata('message');
								echo '<font color="red">' . $msg . '</font>';
							}
							?>
							</td>
						</tr>
						<tr>
							<td class="table-no-broder">City Name</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="city_name" value="<?= $city['info']->cityname;?> "></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"><input
								class="span12" type="text" name="url"
								value="<?= $city['info']->url;?> " />
							</td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_title" value="<?= $city['info']->meta_title;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span12" type="text"
								name="meta_keyword" value="<?= $city['info']->meta_keyword;?>" />
							</td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder">
							<textarea name="meta_description"
									class="span12" rows="5"><?= $city['info']->meta_description;?></textarea>
							</td>
							<td class="table-no-broder"></td>
						
						
						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label> <input type="hidden"
									name="city_id" value="<?= $city['info']->id;?>"> <input
									type="hidden" name="state_id"
									value="<?= $city['info']->stateid;?>">
									<button type="submit"
										class="btn btn-icon btn-primary glyphicons circle_ok pull-right"
										name="insert" value="Update State"
										<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Not allowed in Demo mode '); return false;"
										<?} else?> onclick="return confirm('Are you sure ?');">
										<i></i>Update City
									</button>
							</label>
							</td>
							<td></td>
						</tr>
					</table>

				</fieldset>

			</form>


		</div>
	</div>
</div>

<?php }?>


